﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace Moon.Common.WebInfo
{
    public class WebConfigInfo
    {

        public WebConfigInfo()
        {
            //网站标题
            WebConfigInfo.title = "".Equals(WebConfigInfo.title) ? CoXmlHelper.GetStringConfigValue("title") : WebConfigInfo.title;
            //网站关键字
            WebConfigInfo.key = "".Equals(WebConfigInfo.key) ? CoXmlHelper.GetStringConfigValue("key") : WebConfigInfo.key;
            //网站描述
            WebConfigInfo.mark = "".Equals(WebConfigInfo.mark) ? CoXmlHelper.GetStringConfigValue("mark") : WebConfigInfo.mark;
            //获得站长邮箱
            WebConfigInfo.email = "".Equals(WebConfigInfo.email) ? CoXmlHelper.GetStringConfigValue("email") : WebConfigInfo.email;
            //页尾地址
            WebConfigInfo.footpath = "".Equals(WebConfigInfo.footpath) ? CoXmlHelper.GetStringConfigValue("footpath") : WebConfigInfo.footpath;

            //获得英文版标题
            WebConfigInfo.Etitle = "".Equals(WebConfigInfo.Etitle) ? CoXmlHelper.GetStringConfigValue("Etitle") : WebConfigInfo.Etitle;
            //获得英文版关键字
            WebConfigInfo.Ekey = "".Equals(WebConfigInfo.Ekey) ? CoXmlHelper.GetStringConfigValue("Ekey") : WebConfigInfo.Ekey;
            //获得英文版描述
            WebConfigInfo.Emark = "".Equals(WebConfigInfo.Emark) ? CoXmlHelper.GetStringConfigValue("Emark") : WebConfigInfo.Emark;
            //获得英文版站长邮箱
            WebConfigInfo.Eemail = "".Equals(WebConfigInfo.Eemail) ? CoXmlHelper.GetStringConfigValue("Eemail") : WebConfigInfo.Eemail;
            //英文版页尾地址
            WebConfigInfo.Efootpath = "".Equals(WebConfigInfo.Efootpath) ? CoXmlHelper.GetStringConfigValue("Efootpath") : WebConfigInfo.Efootpath;

            //图片上传格式
            WebConfigInfo.Imgformat = "".Equals(WebConfigInfo.Imgformat) ? CoXmlHelper.GetStringConfigValue("Imgformat") : WebConfigInfo.Imgformat;
            //文件上传格式
            WebConfigInfo.Fileformat = "".Equals(WebConfigInfo.Fileformat) ? CoXmlHelper.GetStringConfigValue("Fileformat") : WebConfigInfo.Fileformat;
            //图片上传最大值
            WebConfigInfo.ImgMax = "".Equals(WebConfigInfo.ImgMax) ? CoXmlHelper.GetStringConfigValue("ImgMax") : WebConfigInfo.ImgMax;
            //文件上传最大值
            WebConfigInfo.FileMax = "".Equals(WebConfigInfo.FileMax) ? CoXmlHelper.GetStringConfigValue("FileMax") : WebConfigInfo.FileMax;
            //文件上传目录
            WebConfigInfo.ImgPath = "".Equals(WebConfigInfo.ImgPath) ? CoXmlHelper.GetStringConfigValue("ImgPath") : WebConfigInfo.ImgPath;
            //图片上传目录
            WebConfigInfo.FilePath = "".Equals(WebConfigInfo.FilePath) ? CoXmlHelper.GetStringConfigValue("FilePath") : WebConfigInfo.FilePath;
            //分页数A
            WebConfigInfo.PageSizeA = "".Equals(WebConfigInfo.PageSizeA) ? CoXmlHelper.GetStringConfigValue("PageSizeA") : WebConfigInfo.PageSizeA;
            //分页数B
            WebConfigInfo.PageSizeB = "".Equals(WebConfigInfo.PageSizeB) ? CoXmlHelper.GetStringConfigValue("PageSizeB") : WebConfigInfo.PageSizeB;
            //分页数C
            WebConfigInfo.PageSizeC = "".Equals(WebConfigInfo.PageSizeC) ? CoXmlHelper.GetStringConfigValue("PageSizeC") : WebConfigInfo.PageSizeC;
            //模板根目录
            WebConfigInfo.Templatepath = "".Equals(WebConfigInfo.Templatepath) ? CoXmlHelper.GetStringConfigValue("Templatepath") : WebConfigInfo.Templatepath;
            //动态显示模块
            WebConfigInfo.ShowAction = "".Equals(WebConfigInfo.ShowAction) ? CoXmlHelper.GetStringConfigValue("ShowAction") : WebConfigInfo.ShowAction;
        }
        //网站标题
        public static string title = "";
        //网站关键字
        public static string key = "";
        //网站描述
        public static string mark = "";
        //获得站长邮箱
        public static string email = "";
        //页尾地址
        public static string footpath = "";

        //获得英文版标题
        public static string Etitle = "";
        //获得英文版关键字
        public static string Ekey = "";
        //获得英文版描述
        public static string Emark = "";
        //获得英文版站长邮箱
        public static string Eemail = "";
        //英文版页尾地址
        public static string Efootpath = "";

        //图片上传格式
        public static string Imgformat = "";
        //文件上传格式
        public static string Fileformat = "";
        //图片上传最大值
        public static string ImgMax = "";
        //文件上传最大值
        public static string FileMax = "";
        //文件上传目录
        public static string ImgPath = "";
        //图片上传目录
        public static string FilePath = "";
        //分页数A
        public static string PageSizeA = "";
        //分页数B
        public static string PageSizeB = "";
        //分页数C
        public static string PageSizeC = "";
        //模板根目录
        public static string Templatepath = "";
        //动态显示页面
        public static string ShowAction = "";

        /// <summary>
        /// 更新数据
        /// </summary>
        public static void UpdateInfo()
        {
            //网站标题
            WebConfigInfo.title = "";
            //网站关键字
            WebConfigInfo.key = "";
            //网站描述
            WebConfigInfo.mark = "";
            //获得站长邮箱
            WebConfigInfo.email = "";
            //页尾地址
            WebConfigInfo.footpath = "";

            //获得英文版标题
            WebConfigInfo.Etitle = "";
            //获得英文版关键字
            WebConfigInfo.Ekey = "";
            //获得英文版描述
            WebConfigInfo.Emark = "";
            //获得英文版站长邮箱
            WebConfigInfo.Eemail = "";
            //英文版页尾地址
            WebConfigInfo.Efootpath = "";

            //图片上传格式
            WebConfigInfo.Imgformat = "";
            //文件上传格式
            WebConfigInfo.Fileformat = "";
            //图片上传最大值
            WebConfigInfo.ImgMax = "";
            //文件上传最大值
            WebConfigInfo.FileMax = "";
            //文件上传目录
            WebConfigInfo.ImgPath = "";
            //图片上传目录
            WebConfigInfo.FilePath = "";
            //分页数A
            WebConfigInfo.PageSizeA = "";
            //分页数B
            WebConfigInfo.PageSizeB = "";
            //分页数C
            WebConfigInfo.PageSizeC = "";
            //模板根目录
            WebConfigInfo.Templatepath = "";
                    //动态显示页面
            WebConfigInfo.ShowAction = "";
            new WebConfigInfo();
        }
    }
}
